Method for storing data elements in a database

ABSTRACT

In an approach to storing data elements in a database, a database management unit provides a table-mapping file for enabling access to a table of a plurality of tables in a storage medium, the table-mapping file comprising a plurality of map records of a single table, a map record comprising information indicative of the table, a column of the table, a data section of the table, and a range of values of data elements included in the data section of the column. The unit receives a data element at the database via a communication interface, determines the table, column, and data section the data element is to be stored in, and stores the data element in the section file corresponding to the determined table, column and data section. The unit then updates the table-mapping file corresponding to the table, columns and data section the data element has been stored in.

BACKGROUND

The present invention relates to a method for storing data elements in adatabase and more specifically in a database comprising a plurality oftables which are subdivided into data sections.

One of the challenges of modern data warehouses is the amount of datawhich has to be processed per every database query. In a naïve approachfor each query the whole table or tables of the database addressed bythe database query would have to be searched for a single queryexpression.

The prior art document U.S. Pat. No. 6,973,452 B2 describes an approachfor limiting scans of loosely ordered and/or grouped relations usingnearly ordered maps. In this approach a large information space isdivided into smaller information extents. These extents are annotatedwith statistics about the information they contain. When a search forinformation includes a restriction based on value, the desired valueranges can be compared to the value ranges of each extent. If thedesired value range lies outside the range of the extent, then theextent cannot hold the desired value and does not need to be included inthe search. The nearly ordered map table entries, each entry consistingof a table identifier, a column-index, a minimum data value, a maximumdata value and an extent identifier, are grouped by column index, sothat all the entries for the n^(th) column of a table are groupedtogether in a single block.

This approach works well in traditional data warehousing environmentswhere massive amounts of data are inserted in bulk into the datawarehouse and the corresponding nearly ordered maps are updated at thesame time as the mass data ingest operation. However, in cases where asingle table contains multiple columns that benefit from using nearlyordered maps and also in cases where the data is trickle-fed into thedata warehouse (that is a relatively small number of records areingested at a time) the performance overhead of managing the nearlyordered maps can be prohibitive, as for each affected column the blockcomprising the nearly ordered map entries of the affected column has tobe read. This is particularly apparent in environments wheretransactional data is constantly being fed into the data warehouse toensure that queries run against the data warehouse include the most upto date information.

SUMMARY

Disclosed herein is an improved method for storing data elements in adatabase and a corresponding database system and a computer programproduct as specified in the independent claims. Embodiments of theinvention are given in the dependent claims. Embodiments of the presentinvention can be freely combined with each other if they are notmutually exclusive.

In one aspect the invention relates to a method for storing dataelements in a database, the database comprising at least one storagemedium, a database management unit and at least one communicationinterface. The database comprises a plurality of tables, the pluralityof tables comprising a plurality of rows, the rows comprising aplurality of columns of data elements. These tables comprised in thedatabase are divided into a plurality of data sections. Each datasection of the plurality of data sections comprises a subset of theplurality of rows and/or data elements from a column of the plurality ofcolumns of a table and is stored in an individual data section file inthe at least one storage medium of the database.

The method for storing data elements comprises providing at least onetable-mapping file for enabling access to a table of the plurality oftables in the storage medium, the table mapping file comprising aplurality of map records of a single table. A map record may compriseinformation indicative of one or more of: a table from the plurality oftables; a column of the table; a data section of the table; and a rangeof values of the data elements comprised in the data section of thecolumn.

The method further comprises receiving the data element to be stored inthe database at the database via the at least one communicationinterface. Subsequently the database management unit determines thetable, column and data section the data element is to be stored in. Oncethese parameters have been determined the database management unitstores the data element in the section file corresponding to thedetermined table, column and data section and updates the table mappingfile corresponding to the table, columns and data section the dataelement has been stored in.

Embodiments may have the advantage that the number of I/O-operationsnecessary to update the map records of a database can be significantlyreduced as will be set forth below.

Usually when new data is inserted into a database, new data is insertedinto all columns of one or more tables stored in the database. Forexample a database may comprise data for online transactional processinglike transactional data of a telephone company. The database may thuscomprise at least one table, comprising for example three columns: afirst column comprising customer-IDs, a second column comprising datesand/or timestamps and a third column comprising the duration oftelephone conversations held by the customer at the date/time indicatedby the corresponding entries in the first and second column of thetable. Whenever new data is inserted into this table, the data will beinserted in the form of {customer-ID, timestamp, duration} and thus allthree columns of the table are affected by the data insertion.

In accordance with the invention in order to update the map recordscorresponding to the table, column and data section the new data hasbeen stored in it is only necessary to access a single table-mappingfile in order to update the map records, as all affected map recordswill be comprised in this table-mapping file. If however the map recordswere for example grouped per column, it would be necessary to access themapping files of each column affected by the update. Thus the number ofI/O-operations for updating the map records of the table would increasewith the number of columns of the table if the map records were groupedby column.

In some embodiment the method further comprises receiving a databasequery for at least one data element via the communication interface ofthe database. The database query comprises information indicative of thevalue or range of values of the queried data elements, a first tablecomprising the data elements and a first column comprising the dataelements. Once the database query has been received, the databasemanagement unit accesses the table-mapping file comprising the maprecords of the first table and determines a first set of data sections.This first set of data sections is characterized in that the value orrange of values of the queried data elements is within the ranges ofvalues comprised in the corresponding map records of the table-mappingfile. The database management unit then scans the section-filescorresponding to the determined first set of data sections for the atleast one queried data element.

Embodiments may have the advantage, that the number of section-fileswhich have to be accessed in order to find queried data elements can besignificantly reduced. If the range of values of the data elementscomprised in a column does not comprise the value or range of values ofthe queried data elements, the queried data elements cannot possibly befound in the corresponding section file. Thus it is not necessary forthe database management unit to retrieve these section-files from thedatabase storage and scan the section-files for the queried dataelements. Instead, using the mapping files a preselection ofsection-files can be conducted thereby reducing the computational effortof searching for data elements.

Further the embodiment described above may be advantageous in the caseof tables comprising only a small number of rows but a huge number ofcolumns. The advantage becomes apparent assuming a database queryincluding predicates across several columns in the table. For example adatabase query may specify a customer-ID as well as a range of durationsin the exemplary table described above. If the map records of the tablewhich is to be scanned for corresponding data elements are stored in onemapping-file per column it would be necessary to access themapping-files of all columns the database query includes predicates forin order to read the relevant map records of the table for conductingthe pre-selection of section-files described above. If however all maprecords are stored together in a single mapping-file, only oneI/O-operation is necessary to access all map records of the table.

However, in some embodiments the database further comprises a pluralityof column-mapping files stored in the storage medium for enabling accessto a column from the plurality of columns. In contrast to atable-mapping file a column-mapping file comprises a plurality of maprecords of a single column instead of a single table. The databasefurther comprises mapping-policy information for the tables comprised inthe database, the policy information being indicative whether to use atable-mapping file or a column-mapping file for enabling access to thedata elements comprised in a table.

Using column-mapping files instead of table-mapping files may beadvantageous in the case of tables having a huge number of rows but onlya limited number of columns or in the case of tables which are usuallyaddressed by database queries comprising predicates for only a limitednumber of columns. Usually the maximum size of a file, especially amapping file is limited. Thus for very long tables it might be necessaryto store the map records of a single table in two or even moretable-mapping files. For example the size of a table with respect to thenumber of rows comprised may be big enough requiring the map records ofthat table to be stored in 4 individual table-mapping files. However itmay be possible to store all map records of a certain column in a singlecolumn-mapping file. Thus, if a query for a data element of a definedcolumn is received, it would only be necessary to access the singlecolumn-mapping file instead of accessing 4 individual table mappingfiles in order to access all map records necessary for the preselectionof section files.

Thus it has to be noted, that both approaches may have their benefits.Grouping map records by table using table-mapping files may bebeneficial in case new data is inserted into a database, as describedabove. Further a table-grouped layout may be beneficial in case of shorttables having a huge number of columns when it comes to databasequeries. However the column-grouped approach using column-mapping filesmay be advantageous in case of database queries specifying a column tobe searched, especially in the case of very long tables comprising ahuge number of rows/datasets. Thus with an increasing number of rows ina table it may be useful to regroup the map records stored in atable-mapping file and store the corresponding map records incolumn-mapping files to take advantage of the benefits of acolumn-grouped approach for long tables described above.

Thus in some embodiments the database management unit may furtherdetermine the number of map records stored in a table-mapping file forexample after predefined time period or after a predefined number ofdatabase updates. The database management unit may then compare thenumber of map records with a predefined threshold number. If the numberof map records exceeds the predefined threshold number, the databasemanagement unit may retrieve the map records from the table-mapping fileand store the map records in column-mapping of the column the maprecords correspond to. For example the threshold number of map recordsmay correspond to the number of columns of a table. This may have theadvantage that as soon as a table becomes too long to capitalize on theeffects of table-grouped map records the map records are regrouped inorder to use the beneficial effects of a column-grouped layout.

In an alternative embodiment, the database may further comprise at leastone access-log file stored in the storage medium, the access-log filecomprising information for the tables indicative of a number ofoperations for storing data elements and/or a number of queries for dataelements of the table. The database management unit may then be adaptedto determine a ratio of queries to storing operations for a table usingthe information comprised in the access-log file and compare thedetermined ratio to a predefined threshold ratio. If the determinedratio exceeds the predefined threshold ratio, the database managementunit may retrieve the map records from the table-mapping file and storethe map records in the column-mapping file the column the map recordscorrespond to.

As described above the use of table-mapping files may be particularlyadvantageous in cases where new data is stored in a table, while the useof column-mapping files may be advantageous for database queries. Thusit may be advantageous to determine whether a table is preferably usedfor storing data or for retrieving data as expressed by the ratiodetermined in accordance with the embodiment. In case it is determined,that the table is preferably used for storing new data, the use oftable-mapping files may be advantageous. If however it is determined,that the table is frequently used for database queries it may be usefulto regroup the map records of the table and store the map records incolumn-grouped mapping files. Thus the benefits of both grouping layoutscan be exploited.

In another aspect the invention relates to a database system comprisingat least one storage medium, a database management unit and at least onecommunication interface. The storage medium comprises a plurality oftables, the plurality of tables comprising a plurality of rows, the rowscomprising a plurality of columns of data elements. The tables stored inthe storage medium are divided into a plurality of data sections, eachdata section of the plurality of data sections comprising a subset ofthe plurality of rows and/or data elements from a column of theplurality of columns. Each data section is stored in an individual datasection file in the storage medium of the database.

The database system is adapted to provide at least one table mappingfile for enabling access to a table of the plurality of tables in thestorage medium, the table mapping file comprising a plurality of maprecords of a single table wherein a map record comprises informationindicative of one or more of: a table from the plurality of tables; acolumn of the table; a data section of the table; and a range of valuesof the data elements comprised in the data section of the column.

The database system is further adapted to receive the data element atthe database via the communication interface, determine the table,column and data section the data element is to be stored in by thedatabase management unit, store the data element in the section filecorresponding to the determined table, column and data section andupdate the table mapping file corresponding to the table columns anddata section the data element has been stored in by the databasemanagement unit.

In yet another aspect the invention relates to a computer programproduct comprising machine-executable instructions for performing themethod as described above.

BRIEF DESCRIPTION OF THE DRAWINGS

In the following embodiments of the invention are explained in greaterdetail by way of example only making reference to the drawings in which:

FIG. 1 depicts a block diagram of a database system comprising a table,in accordance with an embodiment of the present invention;

FIG. 2 depicts a schematic of the contents of a map record as well asthe table grouped and column grouped layout of mapping files, inaccordance with an embodiment of the present invention;

FIG. 3 depicts a flow diagram of a method for storing data elements in adatabase and updating the corresponding mapping files, in accordancewith an embodiment of the present invention; and

FIG. 4 depicts a block diagram of components of a data processingsystem, such as the database system of FIG. 1, in accordance with anembodiment of the present invention.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of a database system 100, the database system100 comprising a database management unit 102, a communication interface104 and a storage medium 106. The database management unit 102 may forexample comprise a central processing unit comprising one or more singleor multi core processing units, the database management unit 102 furtherbeing operatively coupled to the communication interface 104 and to thestorage medium 106. The database management unit 102 may furthercomprise a main memory like a random access memory and may be operableto read data from the storage medium 106 and provide the data thusextracted in the main memory for further processing by the processingunits of the database management unit 102.

The communication interface 104 may be any kind of interface capable ofcommunicating information from or to the database system 100. As suchthe communication interface may for example be an ethernet port operableto form a logical connection to a storage area network or a local areanetwork. Using the communication interface 104 it is possible to loaddata into the storage medium 106 wherein the loading of data into thestorage medium 106 is managed by the database management unit 102.

The storage medium 106 may be any kind of digital storage like one ormore hard disks, a tape storage, a plurality of solid state disks or anyother digital device capable of storing data.

As illustrated in FIG. 1 the storage medium 106 comprises at least onetable 108 denoted as Table 1. Table 1 comprises a plurality of columns,in this case column 1, 2 and 3 and a plurality of rows denoted by row 1to row N. Each row may comprise one data element per column therebyforming datasets. As indicated by the dotted lines to the right of thetable 108 it is also possible to introduce more columns withoutdeparting from the present disclosure. As is further illustrated in FIG.1, the table comprised in the storage medium 106 is divided into datasections, in this case into data sections 1, 2 and 3. Each data sectioncomprises a number of rows, in this case data section 1 comprises rows1-5, data section 2 comprises rows 6-10 and data section 3 comprisesrows 11-N. The data comprised in each data section may for example bestored in an individual data section file in the storage medium 106 ofthe database system 100. A data section file may be identified by usingits storage ID within the storage medium 106.

As is further illustrated in FIG. 1 the storage medium 106 furthercomprises a mapping file 110 for Table 1. The mapping file comprises aplurality of map records 112 which will be described in the following.

Further the storage medium 106 may comprise an access log file 130 forTable 1 which may be understood as a protocol of data storage and dataretrieval operations executed on table 1.

FIG. 2 shows a schematic of a map record 112 as introduced withreference to FIG. 1. The map record 112 comprises statistical data for achunk of information taken from the table 108 comprised in the storagemedium 106 of the database system 100. For example the map record 112comprises information indicative of the table the chunk of dataoriginates from, the column the chunk of data is taken from, the sectionfile the data is stored in as well as the minimum value and the maximumvalue of the data elements stored in the plurality of rows comprised inthe chunk of data. Going back to table 108 illustrated in FIG. 1, column1 may comprise the entries 15 in row 1, 8 in row 2, 32 in row 3, 4 inrow 4 and 12 in row 5. As a result the map record for table 1, column 1and data section 1 would further comprise the information that theminimum value of the data section is 4 and the maximum value of the datasection is 32. This information will also be gathered for the remainingpossible combinations of table, column and section file such that eachchunk of data that can be analyzed with regards to a minimum and maximumvalue has a corresponding map record 112 stored in the mapping file 110for the table.

For example the columns of table 108 comprised in the storage medium 106may be indicative of a certain type of information. For example column 1may comprise customer IDs, column 2 may comprise a dates and column 3may comprise a durations of telephone conversations on the datesspecified in column 2 held by the user as specified by the correspondinguser ID in column 1. The database system 100 may now for example receivea database query, the query asking for all the communication dataavailable for a user with user ID 35. The database management unit 102may then access the mapping file 110 for the table and search throughall the map records 112 thereby determining the chunks of data of column1 which may comprise the user ID 35. As the value 35 is not within therange given by the minimum value and maximum value of the data section 1of column 1, the database management unit 102 will discard thiscorresponding section file as the information queried cannot possibly befound in this section file. Thus it is possible to discard a pluralityof data files which then will not have to be searched in order toexecute the database query.

FIG. 2 further comprises a schematic of two possible ways of storing maprecords 112 in mapping files 110. These two possibilities are a tablegrouped layout 114 and a column grouped layout 116. In the following amap record 112 is identified by three numbers: the table number, thecolumn number and the section file number as illustrated in theexemplary map record 118.

As an example the storage medium 106 of a database system 100 maycomprise two tables with numbers 1 and 2, both tables comprising threecolumns which are denoted by the numbers 1, 2 and 3. The data comprisedin the three columns of table 1 is comprised in three data sections withthe section file numbers 18, 19 and 20 wherein the data comprised in thethree columns of table 2 is stored in two section files with the numbers51 and 52. As a result the overall number of map records 112 which haveto be stored is 15.

The first example for storing map records 112 is the table groupedlayout 114 depicted in FIG. 2. As is illustrated there are two mappingfiles 120 and 122 wherein the mapping file 120 is the mapping file fortable 1 and the mapping file 122 is the mapping file for table 2. As aresult each map record 112 stored in the mapping file 120 has the number1 on the first position of the map records 112. Accordingly each maprecord 112 stored in the mapping file of table 2 122 is denoted by a 2in the first digit. As a result mapping file 120 of table 1 comprises 9map records 112 and the mapping file 122 of table 2 comprises 6 maprecords 112.

FIG. 2 further depicts a column grouped layout 116 wherein the maprecords 112 are stored not per table but per column. As a result thereare three mapping files 124, 126 and 128 each mapping file onlycomprising map records 112 of a single column. As a result each maprecord 112 comprised in the mapping file 124 of column 1 has the number1 on the second digit. Accordingly the map records 112 stored in themapping file of column 2 126 have the number 2 on the second digit andthe map records 112 stored in the mapping file 128 of column 3 have thenumber 3 on the second digit.

It has to be noted that with layout 116 a single mapping file maycontain map records 112 of both tables. The effect of the layouts 114and 116 becomes apparent considering that for example a single new rowis introduced in table 1 as depicted in FIG. 1. For example a new rowmay be introduced as row 4 and is thus part of data section 1. With theintroduction of the new row, columns 1, 2 and 3 each now have a newentry which has to be considered regarding the corresponding maprecords. For example the data elements thus inserted into the table mayhave the value 34 in column 1. As a result the previously described maprecord 112 for column 1 of table 1 with regard to data section 1 will nolonger be valid as the value of 34 is not within the previously definedranges of 4-32. Thus it is necessary to update the map record forexample by changing the maximum value stored in the map record 112 to34. The same problem may arise for all columns in which new dataelements have been inserted.

In order to change the map records 112 comprised in a mapping file thedatabase management unit 102 will have to read the mapping file 110 fromthe storage medium 106 and temporarily store the mapping file in themain memory of the database management unit 102 for further processing.Subsequently the database management unit 102 will update the maprecords 112 comprised in the mapping file and will store the new mappingfile 110 in the storage medium 106. As described before the insertion ofa new row of data into table 1 may lead to the necessity of updating themap records 112 of table 1 for column 1, 2 and 3 in data section 1.Considering the column-grouped layout 116 it would be necessary to readeach mapping file 124, 126 and 128 for columns 1, 2 and 3 from thestorage medium 106 in order to update the affected map records 112comprised in the mapping files. As a result for a complete update of themap records affected by the insertion of new rows of data into thetable, the database management unit 102 has to read, update and storethree individual mapping files.

However, with the table grouped layout 114 it will only be necessary toread the mapping file 120 of table 1 as all map records 112 which areaffected by the insertion of the new data into the table 1 are comprisedin this mapping file 120. Thus it is only necessary for the databasemanagement unit 102 to read a single mapping file, edit the mapping fileand store the mapping file 120 back to the storage medium 106. As aresult with the table grouped layout 114 the computational overheadcaused by updating the map records 112 affected by the insertion of newdata into tables may be significantly reduced compared to the columngrouped layout 116.

However, the column-grouped layout 116 may have benefits when it comesto the processing of a database query wherein the database queryrequires scanning columns of both tables 1 and 2. For example a databasequery may comprise a clause that both tables 1 and 2 are to be scannedfor the same customer_ID comprised in columns with column number 2. Thuswith the example depicted in FIG. 2 there are two tables comprisingcolumn 2 and thus both tables will have to be analyzed in order to findthe search value as defined by the database query. Using the columngrouped layout 116 database management unit 102 will only have to accessthe mapping file 126 of column 2 in order to analyze all map records 112corresponding to column 2. If however, the map records 112 are arrangedin accordance with the table grouped layout 114 the database managementunit 102 would have to access both mapping files 120 and 122 of tables 1and 2 in order to analyze all map records 112 corresponding to column 2.Thus the number of input/output operations upon receiving a databasequery at the database system 100 may be increased with the table groupedlayout 114. As a result it may be useful to deploy both layoutsdepending on the type of table stored in the database system 100.

A further benefit of the column-grouped layout 116 becomes apparentassuming that the number of map records 112 which can be stored in asingle mapping file is for example limited to 10 map records. Furtherassume that table 1 is updated with new rows of data elements which haveto be stored in a new section file, for example because all existingsection files of table 1 are already at the limit of their capacity. Asa result there will be 3 new map records 112 for table 1 (one for eachcolumn of data comprised in the new section file) which have to bestored in a corresponding mapping file. Considering the table-groupedlayout 114, at least 2 of the new map records 112 will have to be storedin a new mapping file for table 1, as the mapping file 120 of table 1already comprises 9 map records 112. Considering the column-groupedlayout 116 no new mapping files have to be created, as the mapping files124, 126 and 128 so far only comprise 5 map records 112 each and only asingle new map record 112 has to be stored per column. Thus after thedatabase update there will be two mapping files for table 1 in thetable-grouped layout 114 and still one mapping file per column in thecolumn-grouped layout 116.

If in this new situation a database query specifies for example acertain value for a data element comprised in column 1 of table 1 thedatabase management unit 102 would have to access both mapping files fortable 1 in case of a table grouped-layout 114 in order to read all maprecords 112 referring to column 1 of table 1. However, considering thecolumn-grouped layout 116 the database management unit 102 would onlyhave to read the updated mapping file 124 of column 1 in order to accessall map records 112 referring to column 1 of table 1.

FIG. 3 is a flow diagram of a method for storing data elements in adatabase system 100 and updating the corresponding mapping files. Themethod starts with the updating of a source table, for example byintroducing new rows of data to the table, step 200. In a subsequentstep 202, the method creates map entries (min/max range) for columns.The map records are created for the columns of the tables which areaffected by the update introducing new rows. To this end the newlycreated map records may comprise a minimum and a maximum value of thedata elements which have been introduced into the individual columns.These new map records are introduced into the mapping files of thetables affected by the data update. To this end, in step 204, a groupingpolicy for the tables which are affected by the data update is queried.As described with reference to FIG. 2 it is possible either to group maprecords by table or group map records by column.

If it is determined that the map records for the table affected by thedata update are to be grouped not per table but per column (decisionstep 206, “no” branch), the database management unit 102 of a databasesystem 100 will read the column-mapping file, for example,column-mapping file 110, for a first column of the plurality of columnsaffected by the data update, step 208. This column mapping file is thenupdated by adding or merging the new entries which have been determinedin step 202 into the column-mapping file read by the database managementunit 102, step 210. In step 212, the updated column mapping file is thenwritten, or stored, in the storage medium 106. In step 214, the methoddetermines if there are more column entries which are affected by thedata update. If this is the case (decision step 214, “yes” branch), themethod returns to step 208 and the column mapping file for the nextcolumn is read from the storage medium 106 by the database managementunit 102. Subsequently the column mapping file is updated and stored instorage medium 106. This procedure is repeated until the mapping filesof all columns affected by the data update and comprising data which canbe used in the context of map records have been updated. As a result instep 214 it will be determined that there are no more column entries(decision step 214, “no” branch), the method will continue with step 216which is the updating of any map index entries whereupon the updateprocedure is complete 218.

If in step 206 it is determined that the grouping policy for the tableaffected by the data update is to group map records 112 per table(decision step 206, “yes” branch), the method continues with the step220 in which the database management unit 102 reads the correspondingtable-mapping file for the table from the storage medium 106 and storesit in main memory. In a subsequent method step 222, the databasemanagement unit 102 adds or merges all the new entries which have beendetermined in method step 202 into the table mapping file and writes, orstores, the new table mapping file in the storage medium 106 in step224. Once the table mapping file has been updated in accordance withmethod steps 220, 222 and 224 it is then determined if a regroupingthreshold has been reached, decision step 226. If this is not the case(decision step 226, “no” branch), the method continues with the methodstep 216 with the updating of any map index entries and subsequently theprocedure is complete 218.

If however it is determined in step 226 that a regrouping threshold hasbeen reached (decision step 226, “yes” branch), the method will continuewith method step 228. In this case regrouping means that the mappingfiles which are arranged in accordance with the table grouped layout 114depicted in FIG. 2 have to be rearranged to comply with the columngrouped layout 116.

In method step 228, the database management unit 102 reads a first newtable mapping file from the storage medium 106. Subsequently in methodstep 230, the column mapping file of a first column corresponding to thetable of the table mapping file is read from the storage medium 106. Inmethod step 232, the new map records comprised in the first new tablemapping file are moved to the column mapping file for the first column.As a result the column mapping file for the first column has beenupdated and can be written, or stored, in the storage medium 106 inmethod step 234.

In step 236, it is then determined whether the first new table mappingfile comprises more map records which correspond to a different column.If this is the case (decision step 236, “yes” branch), the databasemanagement unit 102 reads the column mapping file for a next column instep 230 and moves the corresponding map records from the first newtable mapping file to the new column mapping file and store the columnmapping file in the storage medium 106. This is repeated until no morecolumns are affected by the new map records stored in the first newtable mapping file (decision step 236, “no” branch). As a result themethod will continue with step 238 in which it is determined if thereare more new table mapping files. For example it is possible that thedata update affected more than a single table. In this case (decisionstep 238, “yes” branch), the method steps 228-236 will be repeated asdescribed above for the second new table-mapping file. As soon as allnew table mapping files have been converted into the column groupedlayout (decision step 238, “no” branch), the method continues withmethod step 216 and the map index entries of the mapping files areupdated. The method for storing new data in the database ends with step218.

FIG. 4 depicts a block diagram of components of a data processingsystem, generally designated 400, in accordance with an illustrativeembodiment of the present invention. It should be appreciated that FIG.4 provides only an illustration of one implementation and does not implyany limitations with regard to the environments in that differentembodiments may be implemented. Many modifications to the depictedenvironment may be made.

In the illustrative embodiment, database system 100 of FIG. 1 can beshown in the form of a general-purpose computing device, such ascomputer system 410. The components of computer system 410 may include,but are not limited to, one or more processors or processing unit 414,memory 424, and bus 416 that couples various system components includingmemory 424 to processing unit(s) 414.

Bus 416 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnect (PCI) bus.

Computer system 410 typically includes a variety of computer systemreadable media. Such media may be any available media that is accessibleby computer system 410, and it includes both volatile and non-volatilemedia, removable and non-removable media.

Memory 424 can include computer system readable media in the form ofvolatile memory, such as random access memory (RAM) 426 and/or cachememory 428. Computer system 410 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 430 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM, or other optical media can be provided.In such instances, each can be connected to bus 416 by one or more datamedia interfaces. As will be further depicted and described below,memory 424 may include at least one computer program product having aset (e.g., at least one) of program modules that are configured to carryout the functions of embodiments of the invention.

Program/utility 432, having one or more sets of program modules 434, maybe stored in memory 424 by way of example, and not limitation, as wellas an operating system, one or more application programs, other programmodules, and program data. Each of the operating systems, one or moreapplication programs, other program modules, and program data, or somecombination thereof, may include an implementation of a networkingenvironment. Program modules 434 generally carry out the functionsand/or methodologies of embodiments of the invention as describedherein. Computer system 410 may also communicate with one or moreexternal device(s) 412 such as a keyboard, a pointing device, a display422, etc., or one or more devices that enable a user to interact withcomputer system 410 and any devices (e.g., network card, modem, etc.)that enable computer system 410 to communicate with one or more othercomputing devices. Such communication can occur via Input/Output (I/O)interface(s) 420. Still yet, computer system 410 can communicate withone or more networks such as a local area network (LAN), a general widearea network (WAN), and/or a public network (e.g., the Internet) vianetwork adapter 418. As depicted, network adapter 418 communicates withthe other components of computer system 410 via bus 416. It should beunderstood that although not shown, other hardware and softwarecomponents, such as microcode, device drivers, redundant processingunits, external disk drive arrays, RAID systems, tape drives, and dataarchival storage systems may be used in conjunction with computer system410.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

Possible combination of features described above can be the following:

1. A method for storing data elements in a database (100) comprising atleast one storage medium (106), a database management unit (102) and atleast one communication interface (104), the database comprising aplurality of tables (108), the plurality of tables comprising aplurality of rows, the rows comprising a plurality of columns of dataelements,

-   -   the tables (108) being divided into a plurality of data        sections, each data section of the plurality of data sections        comprising a subset of the plurality of rows and/or data        elements from a column of the plurality of columns, each data        section being stored in an individual data section-file in the        at least one storage medium (106), the method comprising:    -   providing at least one table-mapping file (110) for enabling        access to a table (108) of the plurality of tables in the        storage medium (106), the table-mapping file (108) comprising a        plurality of map records (112) of a single table, a map record        (112) comprising information indicative of        -   a table (108) from the plurality of tables,        -   a column of the table (108),        -   a data section of the table (108),        -   a range of values of the data elements comprised in the data            section of the column,    -   receiving the data element at the database (100) via the at        least one communication interface (104),    -   determining the table (108), column, and data section the data        element is to be stored in by the database management unit        (102),    -   storing the data element in the section file corresponding to        the determined table (108), column and data section by the        database management unit (102), and    -   updating the table-mapping file (110) corresponding to the table        (108), columns and data section the data element has been stored        in by the database management unit (102).

2. The method of feature combination 1, the method further comprising

-   -   receiving a database query for at least one data element via the        communication interface (104), the database query comprising an        information indicative of the value or range of values of the        queried data elements, a first table comprising the data        elements and a first column comprising the data elements,    -   accessing the table-mapping file (110) comprising the map        records (112) of the first table by the database management unit        (102),    -   determining a first set of data sections for which the value or        range of values of the queried data elements is within the        ranges of values comprised in the corresponding map records by        the database management unit (102), and    -   scanning the section-files corresponding to the determined first        set of data sections for the queried data elements by the        database management unit (102).

3. The method of feature combination 1 or 2, the updating of thetable-mapping file (110) further comprising:

-   -   determining by the database management unit (102) whether a map        record (112) corresponding to the table, column and data section        the data element has been stored in already exists,    -   if the map record (112) exists, updating the map record (112) by        the database management unit (102), and    -   if no such map record (112) exists, creating a new map record        (112) for the table, column and data section the data element        has been stored in using the value of the data element as range        of values by the database management unit (102).

4. The method of feature combination 3, the updating of the map record(112) comprising:

-   -   determining the value of the data element by the database        management unit (102),    -   comparing the value of the data element with the range of values        comprised in the map record (112) by the database management        unit (102), and    -   if the value of the data element is not within the range of        values, extending the range of values to the value of the data        element by the database management unit (102).

5. The method of any of the preceding feature combinations, the database(100) further comprising a plurality of column-mapping files stored inthe storage medium (106) for enabling access to a column from theplurality of columns, a column-mapping file comprising a plurality ofmap records (112) of a single column, the database (100) furthercomprising mapping-policy information for the tables (108) comprised inthe database (100), the policy information being indicative whether touse a table-mapping file or a column-mapping file for enabling access tothe data elements comprised in a table (108).

6. The method of feature combination 5, further comprising:

-   -   determining the number of map records (112) stored in a        table-mapping file by the database management unit (102),    -   comparing the number of map records (112) with a predefined        threshold number by the database management unit (102), and    -   if the number of map records (112) exceeds the predefined        threshold number, retrieving the map records (112) from the        table-mapping file (110) and storing the map records in the        column-mapping file of the column the map records correspond to        by the database management unit (102).

7. The method of feature combination 6, the threshold number beingdefined as the number of columns of the table (108) corresponding to thetable-mapping file (110).

8. The method of feature combination 5, the database (100) furthercomprising at least one access-log file (130) stored in the storagemedium (106), the access-log file (130) comprising information for thetables (108) indicative of a number of operations for storing dataelements and/or a number of queries for data elements of a table (108),the method comprising:

-   -   determining a ratio of queries to storing operations for a table        (108) using the information comprised in the access-log file        (130) by the database management unit (102),    -   comparing the determined ratio to a predefined threshold ratio        by the database management unit (102), and    -   if the determined ratio exceeds the predefined threshold ratio,        retrieving the map records (112) from the table-mapping file and        storing the map records (112) in the column-mapping file of the        column the map records (112) correspond to by the database        management unit (102).

9. A database system (100) comprising at least one storage medium (106),a database management unit (102) and at least one communicationinterface (104), the storage medium (106) comprising a plurality oftables (108), the plurality of tables (108) comprising a plurality ofrows, the rows comprising a plurality of columns of data elements,

-   -   the tables (108) being divided into a plurality of data        sections, each data section of the plurality of data sections        comprising a subset of the plurality of rows and/or data        elements from a column of the plurality of columns, each data        section being stored in an individual data section-file in the        storage medium (106), the database system (100) being adapted        to:    -   provide at least one table-mapping file (110) for enabling        access to a table (108) of the plurality of tables in the        storage medium (106), the table-mapping file (110) comprising a        plurality of map records (112) of a single table, a map record        (112) comprising information indicative of        -   a table from the plurality of tables,        -   a column of the table,        -   a data section of the table,        -   a range of values of the data elements comprised in the data            section of the column,    -   receive the data element at the database system (100) via the        communication interface (104),    -   determine the table, column and data section the data element is        to be stored in by the database management unit (102),    -   store the data element in the section file corresponding to the        determined table, column and data section by the database        management unit (102), and    -   update the table-mapping file (110) corresponding to the table,        column and data section the data element has been stored in by        the database management unit (102).

10. A computer program product comprising machine executableinstructions for performing the method of any of the featurecombinations 1-8.

1.-9. (canceled)
 10. A database system comprising at least one storagemedium, a database management unit and at least one communicationinterface, the storage medium comprising a plurality of tables, theplurality of tables comprising a plurality of rows, the rows comprisinga plurality of columns of data elements, the tables being divided into aplurality of data sections, each data section of the plurality of datasections comprising a subset of the plurality of rows and one or moredata elements from a column of the plurality of columns, each datasection being stored in an individual data section-file in the storagemedium, the database system being adapted to: provide at least onetable-mapping file for enabling access to a table of the plurality oftables in the storage medium, the at least one table-mapping filecomprising a plurality of map records of a single table, a map recordcomprising information indicative of one or more of: a table from theplurality of tables, a column of the table, a data section of the table,and a range of values of the one or more data elements included in thedata section of the column; receive the first data element at thedatabase via the at least one communication interface; determine thetable, column, and data section the first data element is to be storedin by the database management unit; store the first data element in asection file corresponding to the determined table, column and datasection by the database management unit; and update the at least onetable-mapping file corresponding to the table, columns and data sectionthe first data element has been stored in by the database managementunit.
 11. The database system of claim 10, the system further adaptedto: receive a database query for at least one data element via thecommunication interface, the database query comprising an informationindicative of a value or range of values of the queried at least onedata element, a first table comprising the one or more data elements anda first column comprising the one or more data elements; access the atleast one table-mapping file comprising the plurality of map records ofthe first table by the database management unit; determine a first setof data sections for which the value or range of values of the queriedat least one data element is within a ranges of values included in thecorresponding map records by the database management unit; and scan oneor more section-files corresponding to the determined first set of datasections for the queried at least one data element by the databasemanagement unit.
 12. The database system of claim 10, the system, whenupdating of the table-mapping file, being further adapted to: determineby the database management unit whether a map record corresponding tothe table, column and data section the first data element has beenstored in already exists; and responsive to determining the map recordexists, update the map record by the database management unit.
 13. Thedatabase system of claim 12, the system being further adapted to:responsive to determining no such map record exists, create a new maprecord for the table, column and data section the first data element hasbeen stored in using a value of the first data element as a range ofvalues by the database management unit.
 14. The database system of claim12, the system, when updating the map record, being further adapted to:determine the value of the first data element by the database managementunit; compare the value of the first data element with the range ofvalues included in the map record by the database management unit; andif the value of the first data element is not within the range ofvalues, extend a range of values to the value of the first data elementby the database management unit.
 15. The database system of claim 10,the database further comprising a plurality of column-mapping filesstored in the storage medium for enabling access to a column from theplurality of columns, a column-mapping file comprising a plurality ofmap records of a single column, the database further comprisingmapping-policy information for the tables included in the database, thepolicy information being indicative of whether to use a table-mappingfile or a column-mapping file for enabling access to the one or moredata elements included in a table.
 16. A computer program product forstoring a first data element in a database comprising at least onestorage medium, a database management unit and at least onecommunication interface, the database comprising a plurality of tables,the plurality of tables comprising a plurality of rows, the rowscomprising a plurality of columns of data elements, the tables beingdivided into a plurality of data sections, each data section of theplurality of data sections comprising a subset of the plurality of rowsand one or more data elements from a column of the plurality of columns,each data section being stored in an individual data section-file in theat least one storage medium, the computer program product comprising:one or more computer readable storage media and program instructionsstored on the one or more computer readable storage media, the programinstructions executable by a computer processor to cause the computerprocessor to perform a method comprising: providing, by a computerprocessor, at least one table-mapping file for enabling access to atable of the plurality of tables in the storage medium, the at least onetable-mapping file comprising a plurality of map records of a singletable, a map record comprising information indicative of one or more of:a table from the plurality of tables, a column of the table, a datasection of the table, and a range of values of the one or more dataelements included in the data section of the column; receiving, by thecomputer processor, the first data element at the database via the atleast one communication interface; determining, by the computerprocessor, the table, column, and data section the first data element isto be stored in by the database management unit; storing, by thecomputer processor, the first data element in the individual datasection-file corresponding to the determined table, column and datasection by the database management unit; and updating, by the computerprocessor, the at least one table-mapping file corresponding to thetable, columns and data section the first data element has been storedin by the database management unit.
 17. The computer program product ofclaim 16, the computer program product further performing the methodcomprising receiving, by the computer processor, a database query for atleast one data element via the communication interface, the databasequery comprising an information indicative of a value or range of valuesof the queried at least one data element, a first table comprising theone or more data elements and a first column comprising the one or moredata elements; accessing, by the computer processor, the at least onetable-mapping file comprising the plurality of map records of the firsttable by the database management unit; determining, by the computerprocessor, a first set of data sections for which the value or range ofvalues of the queried at least one data element is within a ranges ofvalues included in the corresponding map records by the databasemanagement unit; and scanning, by the computer processor, one or moresection-files corresponding to the determined first set of data sectionsfor the queried at least one data element by the database managementunit.
 18. The computer program product of claim 16, the updating of thetable-mapping file further comprising: determining, by the computerprocessor, by the database management unit whether a map recordcorresponding to the table, column and data section the first dataelement has been stored in already exists; and responsive to determiningthe map record exists, updating, by the computer processor, the maprecord by the database management unit.
 19. The computer program productof claim 18, further comprising: responsive to determining no such maprecord exists, creating, by the computer processor, a new map record forthe table, column and data section the first data element has beenstored in using a value of the first data element as a range of valuesby the database management unit.
 20. The computer program product ofclaim 18, the updating of the map record comprising: determining, by thecomputer processor, a value of the first data element by the databasemanagement unit; comparing, by the computer processor, the value of thefirst data element with the range of values included in the map recordby the database management unit; and if the value of the first dataelement is not within the range of values, extending, by the computerprocessor, a range of values to the value of the first data element bythe database management unit.